package whf.file.util;

import java.io.File;

import whf.framework.resource.thread.AbstractPoolableThread;

/**
 * @author wanghaifeng
 * @create Nov 15, 2006 9:46:57 PM
 * 
 */
public class DeleteFileThread extends AbstractPoolableThread {
	private String fileName;
	
	public DeleteFileThread(String fileName){
		this.fileName = fileName;
	}
	/* (non-Javadoc)
	 * @see whf.framework.util.threads.AbstractHandle#handleWhenTimeout()
	 */
	@Override
	public void onTimeout() {
		//do nothing
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Runnable#run()
	 */
	public void run(){
		File file = new File(fileName);
		if(file.exists() ){
			file.delete();
		}
	}
}
